home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 3.2 KB | 160 lines | [TEXT/MPS ] |
- ;
- ; File: Dictionary.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__DICTIONARY__') = 'UNDEFINED' THEN
- __DICTIONARY__ SET 1
-
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- IF &TYPE('__FILES__') = 'UNDEFINED' THEN
- include 'Files.a'
- ENDIF
- ; include 'MixedMode.a' ;
- ; include 'OSUtils.a' ;
- ; include 'Memory.a' ;
-
- ; Dictionary data insertion modes
- kInsert EQU 0 ; Only insert the input entry if there is nothing in the dictionary that matches the key.
- kReplace EQU 1 ; Only replace the entries which match the key with the input entry.
- kInsertOrReplace EQU 2 ; Insert the entry if there is nothing in the dictionary which matches the key.
- ; If there is already matched entries, replace the existing matched entries with the input entry.
-
- ; This Was InsertMode
- ; Key attribute constants
- kIsCaseSensitive EQU $10 ; case sensitive = 16
- kIsNotDiacriticalSensitive EQU $20 ; diac not sensitive = 32
-
- ; Registered attribute type constants.
- kNoun EQU -1
- kVerb EQU -2
- kAdjective EQU -3
- kAdverb EQU -4
-
- ; This Was AttributeType
- ; Dictionary information record
- DictionaryInformation RECORD 0
- dictionaryFSSpec ds FSSpec
- numberOfRecords ds.l 1
- currentGarbageSize ds.l 1
- script ds.w 1
- maximumKeyLength ds.w 1
- keyAttributes ds.b 1
- filler ds.b 1
- sizeof EQU 84
- ENDR
-
- DictionaryAttributeTable RECORD 0
- datSize ds.b 1
- datTable ds.b 1
- sizeof EQU 2
- ENDR
-
- IF GENERATING68K THEN
- Macro
- _InitializeDictionary
- move.w #$0500,d0
- dc.w $AA53
- EndM
- ELSE
- IMPORT InitializeDictionary
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _OpenDictionary
- move.w #$0501,d0
- dc.w $AA53
- EndM
- ELSE
- IMPORT OpenDictionary
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _CloseDictionary
- move.w #$0202,d0
- dc.w $AA53
- EndM
- ELSE
- IMPORT CloseDictionary
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _InsertRecordToDictionary
- move.w #$0703,d0
- dc.w $AA53
- EndM
- ELSE
- IMPORT InsertRecordToDictionary
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _DeleteRecordFromDictionary
- move.w #$0404,d0
- dc.w $AA53
- EndM
- ELSE
- IMPORT DeleteRecordFromDictionary
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _FindRecordInDictionary
- move.w #$0805,d0
- dc.w $AA53
- EndM
- ELSE
- IMPORT FindRecordInDictionary
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _FindRecordByIndexInDictionary
- move.w #$0A06,d0
- dc.w $AA53
- EndM
- ELSE
- IMPORT FindRecordByIndexInDictionary
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetDictionaryInformation
- move.w #$0407,d0
- dc.w $AA53
- EndM
- ELSE
- IMPORT GetDictionaryInformation
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _CompactDictionary
- move.w #$0208,d0
- dc.w $AA53
- EndM
- ELSE
- IMPORT CompactDictionary
- ENDIF
-
- ENDIF ; __DICTIONARY__
-